﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using SqlSugar;

namespace BlazorApp.Model
{
    ///<summary>
    ///
    ///</summary>
    [SugarTable("student")]
    public partial class Student
    {
        public Student()
        {


        }
        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true, ColumnName = "id")]
        public int Id { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>
        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "姓名")]
        [SugarColumn(ColumnName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>    
        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "状态")]
        [SugarColumn(ColumnName = "state")]
        public short? State { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>          
        [Display(Name = "性别")]
        [SugarColumn(ColumnName = "sex")]
        public short? Sex { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>   
        [Display(Name = "出生日期")]
        [SugarColumn(ColumnName = "birth")]
        public DateTime? Birth { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>      
        [Display(Name = "专业")]
        [SugarColumn(ColumnName = "department")]
        public string Department { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>     
        [Display(Name = "地址")]
        [SugarColumn(ColumnName = "address")]
        public string Address { get; set; }

    }
}
